import req from '@/http/http'
import {getServer} from '@/http/AppApi'

let ZHPQ_SERVER = getServer()

// 校园周边重点人员
// 修改
export const updateSchoolFocusPerson = data => {
  let path = ZHPQ_SERVER + '/schoolFocusPerson/' + data.id
  return req.put(path, data)
}
// 删除
export const delSchoolFocusPerson = data => {
  let path = ZHPQ_SERVER + '/schoolFocusPerson/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getSchoolFocusPerson = param => {
  let path = ZHPQ_SERVER + '/schoolFocusPerson'
  return req.get(path, param)
}
// 获取通过 id
export const getSchoolFocusPersonById = id => {
  let path = ZHPQ_SERVER + '/schoolFocusPerson/' + id
  return req.get(path)
}
// 新增
export const createSchoolFocusPerson = data => {
  let path = ZHPQ_SERVER + '/schoolFocusPerson/'
  return req.post(path, data)
}

// 学校
// 修改
export const updateSchool = data => {
  let path = ZHPQ_SERVER + '/school/' + data.id
  return req.put(path, data)
}
// 删除
export const delSchool = data => {
  let path = ZHPQ_SERVER + '/school/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getSchool = param => {
  let path = ZHPQ_SERVER + '/school'
  return req.get(path, param)
}
// 获取list
export const getSchoolList = param => {
  let path = ZHPQ_SERVER + '/school/list'
  return req.get(path, param)
}
// 新增
export const createSchool = data => {
  let path = ZHPQ_SERVER + '/school/'
  return req.post(path, data)
}
// 查看
export const getSchoolById = id => {
  let path = ZHPQ_SERVER + '/school/' + id
  return req.get(path)
}

// 涉及师生安全
// 修改
export const updateStuTeacherSafe = data => {
  let path = ZHPQ_SERVER + '/stuTeacherSafe/' + data.id
  return req.put(path, data)
}
// 删除
export const delStuTeacherSafe = data => {
  let path = ZHPQ_SERVER + '/stuTeacherSafe/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getStuTeacherSafe = param => {
  let path = ZHPQ_SERVER + '/stuTeacherSafe'
  return req.get(path, param)
}
// 新增
export const createStuTeacherSafe = data => {
  let path = ZHPQ_SERVER + '/stuTeacherSafe/'
  return req.post(path, data)
}
